<template>
  <div>
    <h1>List</h1>
    <button @click="sendData">点击向父组件发送数据</button>
  </div>
</template>

<script>
export default {
    name:"List",
    data(){
        return {
            list:[
                {name:"xiaoming",age:18},
                {name:"xiaowang",age:19},
                {name:"xiaoming",age:17},

            ]
        }
    },
    methods:{
        sendData(){
            this.$emit('atguigu',this.list)
        }
    }


}
</script>

<style>

</style>